<div class="layui-card">
    <div class="layui-card-header">
        <span class="layui-breadcrumb pull-right">
            <a href="#!console">首页</a>
            <a><cite>实时在线</cite></a>
        </span>
    </div>
    <div class="layui-card-body">
        <!-- 数据表格 -->
        <table class="layui-table" id="online-table" lay-filter="online-table"> </table>
    </div>
</div>
<script>
    layui.use(['config','table', 'laydate','util'], function () {
        var table = layui.table;
        var laydate = layui.laydate;
        var config = layui.config;
        var util = layui.util;
        // 渲染表格
        table.render({
            elem: '#online-table',
            url: config.base_server + 'api-select/online',
            where: {
                access_token: config.getToken().access_token
            },
            page: true,
            cols: [[
                { field: 'id', sort: true, title: '玩家ID' }
                <!--, {-->
                    <!--field: 'logoutOn', sort: true, templet: function (d) {-->
                        <!--return util.toDateString(d.createdOn);-->
                    <!--}, title: '注册时间'-->
                <!--}-->
            ]]
        });
    });

</script>